#ifndef __WIZ_MEMORY_NEW_DELETE_PAIR_HPP__SHANHAOBO_19800429__
#define __WIZ_MEMORY_NEW_DELETE_PAIR_HPP__SHANHAOBO_19800429__

namespace Wiz
{
    namespace Memory
    {
        namespace NewDeletePair
        {
            template<class AllocatorT, class Param>
            struct Type;
        } /// end of namespace NewDeletePair

        namespace DeleteFunctor
        {
            template<class AllocatorT, typename ElementT>
            struct Type
            {
                typedef AllocatorT      tAllocator;
                typedef ElementT        tElement;
                typedef tElement*       tElemnetPtr;

                ::Wiz::Void::Type operator()(tElemnetPtr EPtr) const
                {
                    ::Wiz::Memory::Placement::Delete<tAllocator, tElement>(EPtr);
                }
            };
        } /// end of namespace DeleteFunctor
    } /// end of namespace Memory
} /// end of namespace Wiz

#endif /*__WIZ_MEMORY_NEW_DELETE_PAIR_HPP__SHANHAOBO_19800429__*/

#undef WIZ_MEMORY_NEW_PARAM_COUNT
#define WIZ_MEMORY_NEW_PARAM_COUNT WIZ_MPP_REPEAT_FILE_COUNT
#if defined(WIZ_MEMORY_NEW_PARAM_COUNT) && (WIZ_MEMORY_NEW_PARAM_COUNT >= 0) && (WIZ_MEMORY_NEW_PARAM_COUNT < 255)

namespace Wiz
{
    namespace Memory
    {
        namespace NewDeletePair
        {
            template<class AllocatorT, typename _ElementT WIZ_COMMA_IF(WIZ_MEMORY_NEW_PARAM_COUNT) WIZ_ENUM_PARAM_X(WIZ_MEMORY_NEW_PARAM_COUNT, class T)>
            struct Type<AllocatorT, _ElementT(WIZ_ENUM_PARAM_X(WIZ_MEMORY_NEW_PARAM_COUNT, T))>
            {
                typedef AllocatorT                                                  tAllocator;
                typedef _ElementT                                                   tElement;
                typedef tElement*                                                   tElemnetPtr;

                typedef ::Wiz::Memory::DeleteFunctor::Type<tAllocator, tElement>    tDelete;

                static tElemnetPtr New(WIZ_ENUM_PARAM_XY(WIZ_MEMORY_NEW_PARAM_COUNT, T, A))
                {
                    return ::Wiz::Memory::Placement::New<tAllocator, tElement>(WIZ_ENUM_PARAM_X(WIZ_MEMORY_NEW_PARAM_COUNT, A));
                }
            };
        } /// end of namespace NewDeletePair
    } /// end of namespace Memory
} /// end of namespace Wiz

#endif /*(WIZ_MEMORY_NEW_PARAM_COUNT) && (WIZ_MEMORY_NEW_PARAM_COUNT >= 0) && (WIZ_MEMORY_NEW_PARAM_COUNT < 255)*/
